<template>
    <div class="storeInfo">
        <div class="head">  </div>
         
        <!-- tab部分 -->
        <div class="tabContainer">
            <el-table :data="tableData" stripe style="width: 100%;text-align:center">
                <!-- 月份	总余额	月度充值	月度消费	净储值金额	押金需新增	当前押金数	数据统计时间 -->
                <el-table-column prop="date" label="月份" fixed></el-table-column>
                <el-table-column prop="balance_price" label="总余额"></el-table-column>
                <el-table-column prop="recharge_price" label="月度充值" width="360"></el-table-column>
                <el-table-column prop="consumer_price" label="月度消费"></el-table-column>                
                <el-table-column prop="net_stored_price" label="净储值金额"> </el-table-column>
                <el-table-column prop="add_cash_pledge_price" label="押金需新增"></el-table-column>
                <el-table-column prop="cash_pledge_price" label="当前押金数"></el-table-column>
                <el-table-column prop="create_time" label="数据统计时间"> </el-table-column>

            </el-table>                       
        </div>
        <!-- 分页部分 -->
        <el-pagination
            background
            layout="total, prev, pager, next, jumper"
            @current-change="changePage"
            :page-size="size"
            :current-page.sync="pageNum"
            :hide-on-single-page=true
            :total="total">{{total}}
        </el-pagination>
    </div>
</template>

<script>
import { abc } from "../../../../js/abc.js";
import {potUrl} from '../../../../js/config_url.js'; 

export default {

    data(){
        return {          
            tableData:[],
            total:50,
            size:20,
            pageNum:1,
            form:{
                size:20,
                page:'1'
            },
        }
    },
    mounted(){
        var that = this;
        that.getList()
    },
    methods:{          
        changePage(val){
            var that = this;
            that.pageNum = val;
            that.form.page = val;
            that.getList()
        },
        
        getList(){
            let that = this;
            abc.get(that,potUrl.storecardcashpledgelist,that.form,(res)=>{
                that.total = res.data.total
                that.tableData =  res.data.list
            });//列表
        }


    }
}

</script>